<template>
  <div class="demo">
    <div class="demo-title">从浮层内关闭</div>
    <div class="demo-content">
      <Popover v-model:visible="visible" title="Title" trigger="click">
        <template #content>
          <a @click="hide">Close</a>
        </template>
        <Button type="primary">Click me</Button>
      </Popover>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  import Button from '@sscd/button';
  import Popover from '@sscd/popover';
  const visible = ref<boolean>(false);
  const hide = () => {
    visible.value = false;
  };
</script>
